package com.yaowen.myapplication;

import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.EditText;

public class Activity extends AppCompatActivity {
    private static final String TAG="AudioPlayerActivity";
    private EditText filenameText;
    private MediaPlayer mediaPlayer;
    private String fileName;
    private int position;
    private Button playButton,pauseButton,resetButton,stopButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        filenameText= (EditText) findViewById(R.id.filename);
        mediaPlayer=new MediaPlayer();
        ButtonClickListener listener=new ButtonClickListener();
        playButton= (Button) findViewById(R.id.play);
        pauseButton= (Button) findViewById(R.id.pause);
        resetButton= (Button) findViewById(R.id.reset);
        stopButton= (Button) findViewById(R.id.stop);
        playButton.setOnClickListener(listener);
        pauseButton.setOnClickListener(listener);
        resetButton.setOnClickListener(listener);
    }

}
